/*
 * $Id: $
 */
package org.rcgwt.client.ui.grid.provider;

import org.rcgwt.client.ui.grid.event.HasOrderChangedHandlers;

/**
 * 
 * @author Olivier Oeuillot (latest modification by $Author: $)
 * @version $Revision: $ $Date: $
 */
public interface IOrderProvider extends
        HasOrderChangedHandlers<IOrderProvider.IOrderState[]> {

    void setOrder(int modelIndex, boolean ascending);

    void appendOrder(int modelIndex, boolean ascending);

    void changeOrderDirection(int modelIndex);

    void clearOrder();

    IOrderState getOrderState(int modelIndex);

    IOrderState[] getOrderStates();

    public interface IOrderState {
        boolean isAsceding();

        int getModelIndex();
    }
}
